﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KMFrame.Permission.Util;
using LGCourt.Logic.BLL;
using KMFrame.Core;

namespace lgweb.lawyer
{
    public partial class notice : System.Web.UI.Page
    {
        private int _pageIndex = 1;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!SessionBox.CheckUserSession())
            {
                Response.Redirect("/user/login.aspx");
            }

            if (!this.IsPostBack)
            {
                GetParam();
                GetGetWSTZTop();
            }
        }

        private void GetParam()
        {
            this._pageIndex = string.IsNullOrEmpty(Request.QueryString["PageIndex"]) ? 1 : Convert.ToInt32(Request.QueryString["PageIndex"]);
        }

        /// <summary>
        /// 获取文书与通知
        /// </summary>
        private void GetGetWSTZTop()
        {
            Lawyer bll = new Lawyer();

            int _userID = SessionBox.GetUserSession().UserID;
            UserCondition param = new UserCondition();
            param.PageIndex = this._pageIndex;
            param.PageSize = 15;
            param.UserID = _userID;

            PageResult result = (PageResult)bll.GetWSTZPage(param);

            if (result != null)
            {
                this.rptWSTZTop.DataSource = result.ResultList;
                this.rptWSTZTop.DataBind();

            }
        }

    }
}